
package jing.typedef.device.urn;

public class ServiceType extends Urn {

    public String getName() {
        return this.getSubType();
    }

    public static ServiceType create(String string) {
        ServiceType thiz = new ServiceType();
        if (!thiz.parse(string)) {
            thiz = null;
        }

        return thiz;
    }

    @Override
    public boolean parse(String string) {
        boolean ret;

        do {
            ret = super.parse(string);
            if (!ret) {
                break;
            }

            if (this.getType() != Type.SERVICE) {
                break;
            }

            ret = true;
        } while (false);

        return ret;
    }
}